<html>
  <head>
      <title>php发送短信验证码</title>
	  <script src="__PUBLIC__/js/jquery-1.8.2.min.js"></script>
  </head>
  <body>
      <form>
	    <div>
			<span>手机号:</span><input  type="text" id="mobile" name="" placeholder="请输入手机号" value="">&nbsp;<a href="#" onclick="getcode(this);" >发送短信</a>
		</div>
	  
	  
	  </form>
  <script>
   var wait=60;
function getcode(obj){
  var mobile = $("#mobile").val();
  if(!(/^1[3|4|5|7|8]\d{9}$/.test(mobile))){
    alert("请输入正确的手机号码");
    return false;
  }
  $.ajax({
             type: "post",
             url: "__ROOT__/Home/Msm/getcode",
             data: {mobile:mobile},
             dataType: "json",
             success: function(data){
                         
                      },
         });
   
}
   
	
  </script>
  </body>

</html>